<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <title>练习1</title>
    <style type="text/css">
      body {
        margin: 0;
      }
      .inner {
        width: 10000px;
        margin: 0 auto;
        overflow: hidden;
        background-color: #191d3a;
        min-width: 10000px;
      }
      .inner a {
        text-align: center;
        height: 40px;
        margin: 0;
        padding-top: 20px;
        padding-left: 20px;
        padding-right: 20px;
        display: inline-block;
        color: #cccccc;
        text-decoration: none;
      }
      .inner a:hover {
        color: #ffffff;
        background-color: green;
      }
    </style>
  </head>

  <body>
    <div class="inner">
      <a href="#home">主页</a>
      <a href="#news">新闻</a>
      <a href="#contact">联系方式</a>
      <a href="#about">关于我们</a>
    </div>

    <div style="padding-left: 16px">
      <h2>顶部导航实例</h2>
      <p>信息内容..</p>
    </div>
  </body>
</html>
